package com.belf.console.domain;

import com.belf.common.annotation.Excel;
import com.belf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 任务配置对象 data_task_conf
 * 
 * @author belf
 * @date 2024-07-24
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DataTaskConf extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 任务模式 */
    @Excel(name = "任务模式")
    private String taskType;

    /** 最大批次 */
    @Excel(name = "最大批次")
    private Long readerBatch;

    /** 执行策略  1=只创建不执行,2=创建后执行 */
    @Excel(name = "执行策略")
    private Long strategy;

    /** 异常处理 */
    @Excel(name = "异常处理")
    private String taskPolicy;

    /** 工作模式/ 流式同步、执行一次 */
    @Excel(name = "工作模式/ 流式同步、执行一次")
    private String jobMode;

    /** 创建表、视图 */
    @Excel(name = "创建表、视图")
    private String jobType;

    /** 源数据库id */
    @Excel(name = "源数据库id")
    private String sourceId;

    /** 源数据库name */
    @Excel(name = "源数据库name")
    private String sourceName;

    /**  */
    @Excel(name = "")
    private String sourceDatabase;
    private String sourceOwner;

    /** 目标数据库id */
    @Excel(name = "目标数据库id")
    private String sinkId;

    /** 目标数据库name */
    @Excel(name = "目标数据库name")
    private String sinkName;

    /**  */
    @Excel(name = "")
    private String sinkDatabase;

    private String sourceDataSchema;
    private String sinkDataSchema;

    private String sinkOwner;

    /** 任务调度器 */
    @Excel(name = "任务调度器")
    private Long jobId;

    private Integer monitorStatus;
    /** 调度器配置 */
    @Excel(name = "调度器配置")
    private String monitorConf;

    /**  */
    @Excel(name = "")
    private String jobName;

    private Integer syncStatus;
    /** CDC配置*/
    @Excel(name = "CDC配置 ")
    private String syncConf;

    private Integer batchStatus;
    /** CDC配置*/
    @Excel(name = "CDC配置 ")
    private String batchConf;

    private  List<DataBatchConf> jdbc;
    private  List<DataBatchConf> tableBatchConf;

//    private List<ColumnSyncConf> mapping;
    @Excel(name = "字段配置")
    private String mapping;

    private Integer typeStatus;
    private String dbTypeMapping;
    private String tableTypeMapping;
    /**  */
    @Excel(name = "")
    private String taskMode;
    private String taskTypeScope;

    /**  */
    @Excel(name = "")
    private String taskTables;

    /** 任务状态 */
    @Excel(name = "任务状态")
    private Long taskStatus;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    private String dsc;

    private List<DataSourceInfo> dataSourceInfoList;

    private String name;

    public DataTaskConf(String sourceId, String sinkId, String sourceDatabase, String sinkDatabase) {
        super();
    }

    public DataTaskConf() {

    }

    public DataTaskConf(Long taskId, String taskType) {
        this.id = taskId;
        this.taskType = taskType;
    }


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTaskName(String taskName) 
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setTaskType(String taskType) 
    {
        this.taskType = taskType;
    }

    public String getTaskType() 
    {
        return taskType;
    }
    public void setReaderBatch(Long readerBatch)
    {
        this.readerBatch = readerBatch;
    }

    public Long getReaderBatch()
    {
        return readerBatch;
    }

    public void setTaskPolicy(String taskPolicy) 
    {
        this.taskPolicy = taskPolicy;
    }

    public String getTaskPolicy() 
    {
        return taskPolicy;
    }
    public void setJobMode(String jobMode) 
    {
        this.jobMode = jobMode;
    }

    public String getJobMode() 
    {
        return jobMode;
    }
    public void setJobType(String jobType) 
    {
        this.jobType = jobType;
    }

    public String getJobType() 
    {
        return jobType;
    }
    public void setSourceId(String sourceId) 
    {
        this.sourceId = sourceId;
    }

    public String getSourceId() 
    {
        return sourceId;
    }
    public void setSourceName(String sourceName) 
    {
        this.sourceName = sourceName;
    }

    public String getSourceName() 
    {
        return sourceName;
    }
    public void setSourceDatabase(String sourceDatabase) 
    {
        this.sourceDatabase = sourceDatabase;
    }

    public String getSourceDatabase() 
    {
        return sourceDatabase;
    }
    public void setSinkId(String sinkId) 
    {
        this.sinkId = sinkId;
    }

    public String getSinkId() 
    {
        return sinkId;
    }
    public void setSinkName(String sinkName) 
    {
        this.sinkName = sinkName;
    }

    public String getSinkName() 
    {
        return sinkName;
    }
    public void setSinkDatabase(String sinkDatabase) 
    {
        this.sinkDatabase = sinkDatabase;
    }

    public String getSinkDatabase() 
    {
        return sinkDatabase;
    }
    public void setJobId(Long jobId) 
    {
        this.jobId = jobId;
    }

    public Long getJobId() 
    {
        return jobId;
    }
    public void setMonitorConf(String monitorConf) 
    {
        this.monitorConf = monitorConf;
    }

    public String getMonitorConf() 
    {
        return monitorConf;
    }
    public void setJobName(String jobName) 
    {
        this.jobName = jobName;
    }

    public String getJobName() 
    {
        return jobName;
    }
    public void setSyncConf(String syncConf) 
    {
        this.syncConf = syncConf;
    }

    public String getSyncConf() 
    {
        return syncConf;
    }
    public void setTaskMode(String taskMode) 
    {
        this.taskMode = taskMode;
    }

    public String getTaskMode() 
    {
        return taskMode;
    }
    public void setTaskTables(String taskTables) 
    {
        this.taskTables = taskTables;
    }

    public String getTaskTables() 
    {
        return taskTables;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskName", getTaskName())
            .append("taskType", getTaskType())
            .append("readerBatch", getReaderBatch())
            .append("taskStrategy", getStrategy())
            .append("taskPolicy", getTaskPolicy())
            .append("jobMode", getJobMode())
            .append("jobType", getJobType())
            .append("sourceId", getSourceId())
            .append("sourceName", getSourceName())
            .append("sourceDatabase", getSourceDatabase())
            .append("sinkId", getSinkId())
            .append("sinkName", getSinkName())
            .append("sinkDatabase", getSinkDatabase())
            .append("jobId", getJobId())
            .append("monitorConf", getMonitorConf())
            .append("jobName", getJobName())
            .append("syncConf", getSyncConf())
            .append("taskMode", getTaskMode())
            .append("taskTables", getTaskTables())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
